Software-based voltage detection to reserve device power upon shutdown

ABSTRACT

Methods and apparatus are provided for reserving power in a handheld computer by inducing a sleep mode when the energy supply of the handheld computer reaches a predetermined low level. A software is provided which operates a sleep mode when a device of the handheld computer detects a predetermined low battery voltage. A processor operates the software to place the handheld computer in a low energy-consuming shutdown state in which an interrupt controller operates to mask those interrupt signals thus providing an user with the impression that the device has entered an unresponsive sleep mode. In maintaining the sleep mode, the processor operates such that all input signals that request the handheld computer to power up remain active but so long as the battery voltage remains below a predetermined voltage the interrupt signals to power up selected applications and devices are masked. A method for returning the handheld computer to its normal operational mode once the energy supply has been replenished, is also provided.

REFERENCE TO RELATED APPLICATIONS

This application is a continuation in-part of application Ser. No.09/321,686, now U.S. Pat. No. 6,425,087 entitled “Method and Apparatusfor Using Residual Energy in a Battery-Powered Computer,” filed May 28,1999, and naming Neal A. Osborne, Francis James Canova, Jr., Nicholas M.Twyman, Scott R. Johnson and Steven C. Lemke as inventors. Thisapplication incorporates application Ser. No. 09/321,686 by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates generally to the field of handheld computers. Moreparticularly, the invention relates to providing a battery powermanagement software for a handheld computer.

2. Description of the Related Art

Most commercial, handheld computers have a built-in battery system. Inaddition to the battery provided, most handheld computers also have abattery adapter that serves as a battery recharger. The expected usageof a handheld computer is that the operator will use it several times aweek, for periods of several minutes at a time. The computer will drainthe battery at a moderate rate when the computer is running, and at theself-discharge rate when the computer is shut off. Quite often, the userwill use the computer until the “low battery” alarm sounds. At thispoint, the battery may be drained of 90% of its useful capacity beforethe user recharges it.

Conventional battery-powered handheld computers provide a single warningmessage before the primary battery discharges to a cutoff voltage. Atthe cutoff voltage, the battery-powered computer can no longer bepowered by the primary battery and a lockout of applications may occur.The operating voltage of the primary battery discharging below a certainpredetermined warning voltage typically triggers the single warningmessage. Such operating voltage based warning messages can beunsatisfactory due to accuracy limitations of the voltage detectioncomponent(s) used to monitor the operating voltage, the warning messageis provided too late for the user.

Some conventional battery-powered computers rely on an alternativeenergy source to ensure retention of data when the energy level of theprimary energy source goes below a minimum energy level. Thesealternative energy sources can include small batteries such as watchbatteries, large capacitors, and other energy storage devices. Thecapacity requirements for the alternative energy sources are typicallymuch lower than the primary energy source capacity. The alternativeenergy source provides a voltage source when the batteries are replaced.For example, in the Palm III™ handheld computer from Palm Computing,Santa Clara, Calif., a capacitor is charged by the primary energy source(two AAA sized alkaline batteries). The capacitor provides analternative energy capacity that enables the Palm III™ to retain datafor approximately one minute to three minutes without charge from thealkaline batteries, e.g., when the user is replacing the alkalinebatteries.

Some prior art devices use secondary or alternate batteries, such aswatch batteries. In these devices, the remaining capacity of thealternate battery must be monitored to avoid unpredictable. Monitoringthe remaining capacity of the alternate battery is duplicative of anyprovision to monitor the capacity of the primary battery itself.

Some handheld computers provide a warning that the main battery needs tobe recharged and then locks out the hardware of the computer. The chargeremaining on the main battery is then used as a capacitor to retain thedata in the memory. Typically, the user has 1-2 days to recharge thebattery on the computer to avoid loss of stored data.

SUMMARY OF THE INVENTION

The following description and claims relate to a software program whichprovides additional time for an user to replenish an energy source of ahandheld computer after the energy source has discharged topredetermined low level. A method for implementing the software programby interrupting the activation of peripherals in response to a power“on” signal, thereby inducing the handheld computer to “play dead,” isprovided.

When the energy supply source has discharged to a low level, and priorto implementing a hardware lockout, the software program operates toinduce the handheld computer to respond to signals for powering up thedevice by interrupting the flow of activation signals for certaindevices and applications, thereby providing the user with the impressionthat handheld computer is apparently in a shutdown mode. An apparatusfor operating the software interrupt in a handheld computer is alsoprovided.

These, and other, goals and aspects of the invention will be betterappreciated and understood when considered in conjunction with thefollowing description and drawings.

BRIEF DESCRIPTION OF THE FIGURES

Various embodiments of the invention are illustrated in the drawingsaccompanying and forming a part of this specification, wherein likereference characters (if they occur in more than one view) designate thesame parts. It should be noted that the features illustrated in thedrawings are not necessarily drawn to scale.

FIG. 1 is a block diagram of a handheld computer adapted to enter asoftware based shutdown state when the energy supply of the handheldcomputer reaches a predetermined low energy level.

FIG. 2 is a control flow diagram for providing low battery powerwarnings and lockouts for a handheld computer according to oneembodiment of the invention.

FIG. 3 illustrates a battery discharge curve for a handheld computer,according to an embodiment of the invention.

FIG. 4 is a control flow diagram for implementing a software-basedshutdown in a handheld computer with low residual battery power,according to an embodiment of the invention.

DETAILED DESCRIPTION A. Introduction

Handheld computers are often battery-powered. Warning messages andhardware lockouts are typically used to warn the user when the energysource nears depletion in order to afford the user an opportunity toreplace or recharge the power source before the charge on the batterymodule gets so low that the handheld computer begins to lose data storedin its memory.

Hardware lockouts at very low energy levels usually occur a day or twobefore the battery module discharges to the unacceptably low level whenthe memory begins to lose stored data. A sleep mode initiated five toseven days prior to the hardware lockout provides a user with theimpression that the handheld computer has shut down and adds severaldays to the time within which the user may replenish the energy sourcewithout losing valuable data from the handheld computer. During a sleepmode, the processor of a handheld computer remains active to receiveinput from the keyboard and other sources of signals for powering on thedevice. However, so long as the battery module charge remains below asleep mode threshold, all interrupts to power on energy-consumingperipherals are masked and the user receives no feedback. Thus the useris given the impression that the battery module charge is so low thatthe handheld computer has apparently locked out and the battery modulemust be recharged and replaced.

A system for implementing a software-operated sleep mode in a handheldcomputer is illustrated in FIG. 1. The following description lists theelements of FIG. 1 and their corresponding interconnections anddescriptions.

B. System

A handheld computer 100 including one embodiment of the invention isshown in FIG. 1. Embodiments of the invention may include PalmPilot™,Palm III™, Palm V™, or Palm VII™ connected organizers, manufactured bythe Palm Computing of Santa Clara, Calif. Other embodiments of theinvention can include handheld computers operating the Windows CE™system, or other handheld computers and personal digital assistants. Thefollowing description lists the elements of FIG. 1, their correspondinginterconnections and then describes the elements.

FIG. 1 illustrates a handheld computer 100. The handheld computer 100includes an integrated processor 102, a memory 110, a battery module 130and an analog to digital (A/D) converter 132. The integrated processor102 includes a processor 104, an interrupt controller 106, and a memorycontroller 108. The memory 110 includes a sleep mode software 116 and aresidual energy manager module 114. A subsystem 140 represents a logicalgrouping of elements including the memory 110 and the integratedprocessor 102 coupled by an address and data bus 120.

The address and data bus 120 couples the processor 104, the interruptcontroller 106, the memory controller 108 and the sleep mode software116 and the residual energy manager module 114. At least onerechargeable battery module 130 is accommodated within the handheldcomputer 100 in a series-connected state with the processor 104. The A/Dconverter 132 is coupled with the rechargeable battery module 130 andthe processor 104 to monitor the battery voltage. The A/D converter 132provides a digital signal corresponding to the operating voltage of therechargeable battery module 130 to the processor 104 and the memory 110.In some embodiments, additional hardware resources include a voltagecomparator 134, which provides a battery voltage reading to theprocessor 104.

The following describes the uses of the elements of FIG. 1. Theintegrated processor 102 is a computer processor that includes supportcomponents for a computer. In some embodiments, the DragonBall™processor from Motorola Inc., Schaumburg, Ill., is used as theintegrated processor 102. In other embodiments, the integrated processor102 can be replaced with separate components to provide the functions ofthe integrated processor 102.

The integrated processor 102 has a common address and data bus 120 forinternal communication between components and external communicationwith the memory 110. User applications and software are able to executeon the processor 104. The applications and software that run on theprocessor 104 include: operating systems, organizer programs, expenseprograms, to-do-list programs, scheduling programs, e-mail programs,synchronization programs, display processing programs, and other typesof programs including the sleep mode software 116 and the residualenergy manager module 114.

The memory controller 108 supports access to the memory 110. This mayinclude mapping different banks within the memory 110 to specificaddresses or simply changing the communications used on the address anddata bus 120 to a suitable format for use in communicating with thememory 110.

The residual energy manager module 114 includes a program for detectingresidual battery voltage and stores battery voltage and voltagedifference data for the handheld computer 100. The residual energymanager module 114 can store values corresponding to at least onepre-determined action voltage level. The action voltage levels cancorrespond to actions such as: masking interrupt signals for activatingapplications in the handheld computer 100, or providing a warning to theuser that the battery module 130 has discharged to a low operatingvoltage. The residual energy manager module 114 can compare the digitalvoltage signal provided by the A/D converter with the pre-determinedaction voltage level to detect when the battery module 130 hasdischarged to approximately a pre-determined action voltage level. Ifthe battery module 130 has discharged to an operating voltageapproximating an action voltage level, the residual energy managermodule 114 can provide a signal for the processor 104 to cause thecorresponding action to occur.

An interrupt controller 138 is disposed in the integrated processor 102.The interrupt controller 138 is coupled with the A/D converter 132 andsleep mode control software 116 disposed in the memory 110 and operatesto mask interrupt signals that initiate certain high energy-consumingapplications. This places the battery-powered handheld computer 100 in alow energy consumption “sleep” state when the battery module 130 hasdischarged to approximately a sleep mode voltage.

Programs stored in memory 110 may operate on the processor 104 and,responsive to information transmitted from the sleep mode software 116,the interrupt controller 106 can operate to mask interrupt signals forthe activation of devices such as a display circuit (not shown) by theintegrated processor 102. Controllers for the operation of circuits fordevices may be disposed within the integrated processor 102.

C. Operation of Low Voltage Warning and Lockout System

The following describes a system of warning messages and software andhardware lockouts for a handheld computer with a low battery charge.FIG. 2 illustrates a control flow diagram of the steps performed by thesubsystem 140 in an embodiment.

The warning system shown in FIG. 2 starts with a handheld computer 100in a normal operational state 200, with fully charged (V=V₀) energysupply such as a lithium ion battery with maximum voltage of 4.1 volts(V₀). A first warning 210 is provided when the battery has discharged toa predetermined level (V₁). In some embodiments, the first warning 210is in the form of a visible message displayed on the display screen. Inone embodiment, the handheld computer may be operable for several weeksbefore the first warning 210 occurs. Based on a normal usage pattern oftwenty minutes per day, an embodiment of the handheld computer operatesin a normal mode for approximately 3 weeks at about 25° C. For someembodiments of a handheld computer using a lithium-ion battery 130, thefirst warning voltage (V₁) is set at approximately 3.76 volts and occursat a time t₀. The difference between the fully charged battery voltageV₀ and the first warning voltage 310 (V₁) is approximately 0.35 volts,and is referred to V_(A). The first warning 210 is emitted as specifiedintervals until the time specified for the second warning 220 haselapsed. In some embodiments of a handheld computer, the first warning210 is emitted every 5.5 minutes.

The first warning 210 also starts at least one timer and provides asecond warning 220 after a predetermined time interval. The secondwarning 220 is provided when the measured time approximately equals apredetermined time and no voltage measurement is used to calculate whenthe second warning is given. In some embodiments, the second warning isin the form of a visible message displayed on the display screen. Forsome handheld computer embodiments, the second warning 220 is triggeredby a time corresponding to either three elapsed days (t₁) after thefirst message 210, or sixty minutes of operating time (t₂) under normalusage after the first message 210 occurs, whichever (t₁ or t₂) happensfirst. In some embodiments of a handheld computer, the second warning220 message may include for example “your batteries are extremely low”repeated every 3 minutes. The second warning 220 is based on time andusage factors instead of a voltage value. This guarantees that thesecond warning 220 will appear before the sleep mode 230 which occurs insome embodiments at a voltage V₂ on or about 0.05 volts lower than V₁.The time-based warning system is used because resolving voltagemeasurements with an A/D converter within a range of 0.05 volts issubject to inaccuracies.

In some embodiments, after the first warning message, the residualenergy manager module 114 monitors whether the battery module 130 hasbeen recharged to a predetermined reset voltage (V_(R)) greater than thefirst warning message voltage (V₁). Including a predetermined resetvoltage (VR) recharge level and appropriate code in the residual energymanager module 114 can make this determination 260. If the batterymodule 130 has been recharged to a voltage level greater than thepredetermined reset voltage (V_(R)), the operation of the handheldcomputer 100 continues by resetting the timer 270 for the second warningmessage. Otherwise, the timers continue as if no recharging hasoccurred.

The process continues by providing a sleep mode 230 when the batterymodule 130 has discharged to a predetermined voltage V₂. The sleep mode,discussed in greater detail in the next section D, causes the handheldcomputer 100 to power off and enter a shutdown state. The processor 104transitions from a clock running state 200 to a shutdown state 230 whenprocessor 104 receives a shutdown signal. During a sleep mode 230, theprocessor 104 is in an energy-conserving state and interrupts toactivate certain applications and devices are masked. In the shutdownstate, devices (such as a keyboard) for inputting interrupts to signalthe processor 104 to power up devices remain active.

If a signal to power on a handheld computer 100 in a shutdown state isreceived from an input device, the processor 104 operates the residualenergy manager module 114 to initially determine the presence of ashutdown state and checks the residual battery power. If the residualbattery voltage is greater than a predetermined reset voltage V_(R), thehandheld computer is returned to a normal operational mode. In someembodiments of a handheld computer, the predetermined reset voltage(V_(R)) is set at about 3.81 volts, or at 0.10 volts higher than thesleep mode voltage (V₂) of about 3.71 volts.

Because many battery technologies, especially those involvingrechargeable batteries, have a flat discharge curve, wherein the batterymodule delivers a large portion of its energy within a narrow voltagerange and both V₁ and V₂ occur within this range, their measurement issubject to inaccuracies. Therefore, measurements of the voltage levelsfor the first warning message (V₁) and the sleep mode (V₂) is providedby the digital-to-analog (A/D) converter 132 to the residual energycontrol module 114. In some embodiments, the A/D converter 132 providesa digital value representing the battery module 130 voltage to theresidual energy manager module 114. The digital value from the A/Dconverter 132 can be used to overcome voltage resolution limitationscharacteristic of the voltage comparator 134. In some embodiments, therange of battery module 130 voltage from fully charged to totallydischarged is provided by the A/D converter 132 on a scale of 0 through255.

When the battery module 130 voltage level (V₃) decreases to apredetermined hardware lockout voltage level (V_(L)), some embodimentsof the handheld computer can implement a hardware lockout 240. Thepredetermined hardware lockout voltage (V_(L)) can be calculated toensure that sufficient residual energy remains in the battery module 130to retain data stored in the memory 110 for a period of time betweenbattery charging opportunities. In some embodiments, the hardwarelockout voltage (V₃) occurs at 3.5 volts and affords the user a periodof 2-3 days to replenish the battery module 130 or begin to lose data. Avoltage comparator 134 may determine the hardware lockout voltage (V₃)by comparison with a preset voltage level (V_(L)).

In other embodiments, various combinations of one or more of the warningsteps 210 and 220, and the hardware lockout step 240 are included withthe sleep mode provision 230. Details of the warning message system andthe hardware lockout system are provided in application Ser. No.09/321,686, entitled “Method and Apparatus for Using Residual Energy ina Battery-Powered Computer,” by Osborn, et al. which is incorporatedherein by reference as if set forth in its entirety.

D. Operation of the Sleep mode Program

The following describes a method for operating a sleep mode system whenthe battery module has discharged to a predetermined level. FIG. 4illustrates a control flow diagram of the steps performed by thesubsystem 140 of a preferred embodiment.

With a fully charged energy source (battery) 130, the handheld computer100 operates in a normal mode and all energy-consuming applications anddevices are responsive to interrupt signals. The A/D converter 132periodically monitors the charge on the battery module 130 and providesthe residual energy manager module 114 with a digitized reading of thevoltage level (V) of the battery module 130 (block 410). The residualenergy manager module 114 compares the voltage level (V) of the batterymodule 130 provided by the A/D converter 132 with predetermined voltagelevels stored in the memory 110 corresponding to warning messages anddevice lockouts (block 420).

When the voltage level (V) reaches a predetermined level (V₂)corresponding to a sleep mode, the processor 104 operates the residualenergy manager module 114 to initiate a sleep mode (block 430). In thesleep mode, the processor 104 is kept at a shutdown state in which theexecution of any command is inhibited so that the consumed power of theprocessor 104 can be reduced. The shutdown state bus cycle let any otherdevices (e.g., chip set or other processors) that are coupled toprocessor 104 know that processor 104 is in a power down mode but isstill able to respond to some events, including interrupts and reset. Inan embodiment, the sleep mode occurs at the predetermined level (V₂) ofabout 3.71 volts.

In one embodiment, a transient warning message is communicated to theuser when the sleep mode is being set. This occurs while the user isusing the handheld computer in order to ensure that the user is notgiven the impression that the handheld computer is malfunctioning, butrather that it is entering a sleep mode. The warning may be audible orvisible. An audible message may be in the form of a beep or asynthesized voice message. A visible warning may be temporarilydisplayed in the form of a message on the display device or displayed asa flashing light.

The handheld computer 100 enters the shutdown state by powering off andcausing all energy-consuming peripherals to become unresponsive to theuser. The low energy-consumption shutdown state of the handheld computer100 is maintained by the interrupt controller 106 which masks interruptsignals for activating certain high-energy functions including poweringa display device, performing radio frequency wireless communications andsynchronizing data through modem, RS-232 communication port, or infrared(IR) port.

An interrupt to power up the handheld computer 100 during the shutdownstate, causes the processor 104 to operate the sleep mode software 116to first determine whether a sleep mode has been initiated and if so, tocheck the voltage level (V) of the battery module 130 provided by theA/D converter 132 and compare with a predetermined reset voltage level(V_(R)). If V<V_(R), then the sleep mode software 116 is operated toresume the shutdown state. The processor 104 is powered down, allperipherals are low power but the keyboard and the power button remainactive.

Unlike a lockout state, the interrupt controller 106 in a sleep mode isnot operated to mask all interrupt signals from the power button,application buttons or connected accessories to the handheld computer100. Only those interrupt signals are masked which operate to activateapplications or devices that respond to the user, such as the displaydevice or a communication device. Thus, the processor 104 (block 440)receives any interrupt signal entered by the user to power up thehandheld computer 100. The processor 104 then operates the sleep modesoftware 116 to determine whether the handheld computer 100 is operatingunder a sleep mode (block 450). If the sleep mode is not operative atthe time the interrupt signal to turn power on is received, the handheldcomputer 100 responds by powering on to a normal operational mode (block495).

However, if the sleep mode is operative at the time the interrupt signalto turn on power is received, the processor 104 operates the residualenergy manager module 114 to check the battery voltage (block 460). Ifthe battery module has been sufficiently recharged in the interim to avoltage above a predetermined reset level (V_(R)) 475, the processor 104reconfigures the interrupt controller 106 to end the shutdown state ofthe handheld computer 100 and allow the handheld computer 100 to operatein a normal energy-consumption mode (block 495). In an embodiment of ahandheld computer, the sleep mode ceases to operate at a battery voltageabove the predetermined reset level (V_(R)) of 3.81 volts.

If the battery module has not been recharged to the predetermined resetlevel (V_(R)), the sleep mode remains operational and the handheldcomputer 100 remains in the low energy-consumption shutdown state (block480). The processor 104 responds to the signal to power up the handheldcomputer 100 by operating the interrupt controller 106 to mask theinterrupts which operates applications and devices which providefeedback to the user that the handheld computer has been turned on.

E. Alternative Embodiments

Specific embodiments of the invention are further described in thefollowing examples which illustrate various significant features.

One example of a battery-powered handheld computer 100 according to someembodiments of the invention uses a lithium-ion battery having dischargeproperties illustrated by the discharge cycles in FIG. 3. The batterymodule 130 represented in FIG. 3 may be, for example, a UF612248lithium-ion battery from SANYO Energy (U.S.A.) Corporation, San Diego,Calif., which has a rated capacity (1.0 C) of approximately 400milliamp-hours for an initial charge of 4.1 volts.

FIG. 3 shows a first discharge cycle curve 300A for a lightly-loadedbattery module 130 where the discharge rate is approximately 80milliamperes (mA). Energy efficient portable computers have batterymodule 130 discharge rates similar to 80 mA (0.2 C, or one-fifth of the1.0 C rated capacity) as represented in the first discharge cycle curve300A. A second discharge cycle curve 300B, shown in FIG. 3 forcomparison purposes only, represents the curve for a moderately-loadedlithium-ion battery 130, e.g., 400 mA discharge rate. The thirddischarge cycle curve 300C represents a heavily loaded lithium-ionbattery 130, e.g., 800 mA discharge rate. The voltages for the variousmessage and lockout levels for this first example are based on anestimate of 300 microamperes for the current used by the battery-poweredhandheld computer 100 in standby mode, and an estimated 12 milliamperesof active use current. The message and lockout levels values, indicatedon FIG. 3, are also based on an average of twenty minutes of active usetime per day. Based on these estimates, the battery-powered computer 100consumes approximately 12 milliamp-hours per day during normaloperation.

In some embodiments, the battery-powered computer 100 provides a firstwarning when the battery module 130 discharges to a first warning (M1)voltage 310. For some embodiments of a portable computer using alithium-ion type battery, the M1 voltage 310 (V₁) is set atapproximately 3.76 volts and occurs at a time t₀. For example, a Palm V™connected organizer can be used for approximately 21 days at 25° C. fromthe M1 warning occurs. The twenty-one day period is based on the batterydischarge curve for the lithium-ion battery 130, and a normal usagepattern of twenty minutes per day and on the assumption that the battery130 is fully charged to approximately 4.1 volts (V₀) at the beginning ofthe 21-day period. The difference between the fully charged battery 130voltage V₀ and the M1 voltage 310 (V₁) is approximately 0.35 volts, andis referred to as V_(A) in FIG. 2.

In some embodiments, the A/D converter 132 provides a digital valuerepresenting the battery module 130 voltage to the residual energymanager module 114. The digital value from the A/D converter 132 can beused to overcome voltage resolution limitations characteristic of thevoltage comparator 134.

The residual energy manager module 114 can store the M1 voltage 310. Inresponse to receiving a digital value representing a voltageapproximately equal to the M1 voltage 310 from the A/D converter 132during discharge of the battery module 130, the residual energy managermodule 114 can cause the display of a first warning message on the imagescreen of the battery-powered computer 100. For certain handheldcomputer embodiments, the first warning includes a warning that “yourbatteries are low”. The first warning can also inform the user thatplacing the handheld computer into a communications cradle will rechargethe battery module 130.

For some embodiments, the battery-powered computer 100 provides a secondwarning (M2) 320 message that occurs at an M2 time 320 corresponding toa predetermined measure of time after the first warning (M1) messageoccurs. For some embodiments, the M2 message is triggered by an M2 time320 corresponding to either three elapsed days after M1 occurs (t₁), orsixty minutes of operating time assuming normal usage after M1 occurs(t₂), whichever occurs first. M2 is based on time and usage factorsinstead of a voltage value because of the difficulty in resolvingdifferences of less than 0.05 volts, needed to guarantee that the M2warning will appear before the sleep mode L1. For some embodiments, theM2 message includes “your batteries are extremely low”.

A first timer for the second warning can be disposed in the warninglevel calculation circuit 124 and controlled by the residual energymanager module 114 to track the elapsed time after the M1 warning. Asecond timer, also disposed in the warning level calculation circuit 124and controlled by the residual energy manager module 114, can track thebattery-powered computer 100 operation time after the M1 warning. Thesecond timer can be adapted to ensure that a light or heavy user willsee the second M2 warning at an appropriate M2 time 320 after the first(M1) warning, but before the battery-powered computer 100 locks out.

For example, if the battery-powered computer 100 is used for high-energyconsumption functions after the M1 warning, the operating time beforethe second (M2) warning is displayed is reduced by an appropriateamount. The reduction in operating time before the M2 warning occurs canbe accomplished by accelerating the second timer during operation ofhigh-energy consumption functions. In some embodiments, the high-energyfunctions can include use of a backlight to enhance the display, RS-232data synchronization, infrared data synchronization, and wirelesscommunication.

The residual energy manager module 114 can cause the first and secondtimers to be reset to zero in response to the processor 104 detectingthat the battery module 130 is being charged after the user sees the M1message, but before M2. For a handheld computer, such as a Palm V™connected organizer, a communication cradle for synchronizing data, suchas a HotSync™ communication cradle, can also recharge the battery module130.

One embodiment of the invention can detect whether the battery-poweredcomputer 100 is connected to the communication cradle as described byU.S. patent application Ser. No. 09/299,063, entitled “Detection of anAccessory Device Connected to a Portable Computer,” filed, Apr. 23, 1999which is incorporated herein by reference. The residual energy managermodule 114 can respond to the detection of the connection to thecommunication cradle by implementing a timer reset function thatmonitors the battery module 130 operating voltage to determine whetherthe voltage has been charged above a timer reset voltage level asdescribed in the next two paragraphs.

In some embodiments, the processor 104 can respond to an A/D converter132 digital value indicating that the battery module 130 voltage hasbeen charged higher than the M1 voltage by a threshold amount bycanceling the timers. For example, given an M1 voltage 310 of 3.76volts, a timer-reset voltage of 3.81 volts can be used by the residualenergy manager module 114 to cancel the timers.

The M2 voltage can be approximately in the range of 3.73 to 3.74 volts.Recharge of the battery module 130 from the M2 voltage to the initialoperating voltage of 4.1 volts in embodiments using a lithium-ionbattery can take approximately thirty minutes.

The margin of 0.05 volts (or 50 millivolts) used to ensure that thetimer-reset voltage is readily distinguished from the M1 voltage 310.This margin is preferred even for properly calibrated A/D converters 132in order to avoid resetting the timers when the operating voltage hasnot actually recharged to the M1 voltage 310.

In some embodiments of the battery-powered computer 100, the accuracy ofthe digital signal provided by the A/D converter 132 can be improvedfrom approximately 100 millivolts to approximately 50 millivolts bycalibrating the A/D converter 132. The temperature and the A/D converter132 accuracy can force the voltage readings provided to the processor104 and the residual energy manager module 114 up or down the timescale.

Even with calibration, certain factors contribute to variability (oruncertainty) in the values provided by the A/D converter 132 and can beaccounted for such that the messages 210 and 220, sleep mode 230 andlockout 240 meet user expectations. For example, drift can provide anuncertainty of approximately 3 millivolts in some embodiments, A/Dconverter 132 leakage (on or about 15 millivolts), long term stability(on or about 2.5 millivolts), and FET temperature drift (on or about 5millivolts). These contribute to a total uncertainty range ofapproximately ±25.5 millivolts if the A/D converter 132 is calibratedusing an In-Circuit Tester (ICT).

Further, even an accurate battery module 130 voltage measurement is notnecessarily an accurate indicator of remaining battery capacity becausemany battery technologies, especially rechargeable batteries, have a“flat” discharge curve wherein the battery module delivers a largeportion of the battery's energy at approximately the same voltage. Asmentioned above, M2 is based on time and usage factors instead of avoltage value because of the difficulty in resolving 0.05 volts by theA/D converter 132.

The residual energy manager module 114 can store the timer reset voltagelevel (e.g., 3.81 volts), and code to provide a signal to the processor104 to reset the first and second timers upon receiving a value from theA/D converter 132 corresponding approximately to the reset voltagelevel.

In some embodiments, the processor 104 includes an interrupt controller106. The interrupt controller 106 can be programmed to mask off signalsfrom signal producing components such as power-up buttons, wirelesscommunication antennas, application buttons, connected accessory devices(such as synchronization docking ports and modems), and other componentsthat would otherwise begin energy-consuming processing in thebattery-powered computer 100.

In some embodiments, a sleep mode (L1) occurs at an L1 voltage (V₂) 330of approximately 3.71 volts. The difference between the fully chargedbattery module 130 voltage and the L1 voltage (V₂) 330 is approximately0.39 volts, and is referred to as V_(B) in FIG. 2.

According to battery module 130 discharge data at 25° C. and 20% of thedischarge rate at which the battery module capacity is specified,discharge to a battery voltage of approximately 3.71 volts, e.g., thesleep mode voltage, occurs approximately 2 days after the second warning(M2) message for an average user. Discharge to the L1 voltage 330 alsooccurs approximately 7 to 10 days before the battery module 130discharges to the cutoff voltage (2.75 volts) 350 when the averagehandheld computer begins to lose data.

In some embodiments, the residual energy manager module 114 reconfiguresthe interrupt controller 106 when the battery module 130 discharges tothe L1 voltage 330. The reconfiguration causes the processor 104 torespond to interrupt signals from the power button, or applicationbuttons signaling the device to turn the power on, by operating a sleepmode software 116. The sleep mode software 116 operates to maintain thehandheld computer 100 in a shutdown state. In the shutdown state, theprocessor 104 responds to a power on interrupt signal by operating thesleep mode software 116. The sleep mode software 116 tests to see if thehandheld computer 100 is in a shutdown state and upon confirming theoperation of a sleep mode, causes the A/D converter 132 to test thevoltage level of the battery module 130. In some embodiments, thevoltage level below a predetermined reset level (V_(R)) returns thehandheld computer 100 to a shutdown state. In the shutdown state, thepower button and the keyboard of the handheld computer 100 remain activeto receive signals for powering up the device but the interruptcontroller 106 masks interrupt signals to operate applications ordevices thus by providing the user with no feedback.

In some embodiments, operation of the sleep mode software 116 requiresthe processor 104 to remain on for on or about 100 milliseconds which isthe time required to determine the presence of a sleep mode and read theoutput from the A/D converter 132. When the handheld computer 100 plays“dead” in a shutdown state, devices such as the liquid crystal displayscreen do not power up. The user is provided no feedback and isdiscouraged from holding down the power button, which protects thebattery module 130 from further discharge.

The M1, L1, and L2 voltage levels (310, 330 and 340) can be based onproviding approximately three days between M1 and M2, and two daysbetween M2 and sleep mode L1. The estimated duration between sleep modeL1 and cutoff, e.g., loss of battery life when contents of memory 110begin to be lost, is approximately seven days. Sleep mode L1 accountsfor approximately five of those days before a hardware lockout L2 andapproximately two days are provided from the hardware lockout L2 to thebattery cutoff voltage 350. The hardware lockout L2 can force theprocessor 104 to get an interrupt, and lock all the power andapplication switches.

In order to have seven days after L1 before cutoff, the residual energyis approximately 50 mAh (7.2 mAh/day discharge for standby modemultiplied by seven days). Battery module 130 voltage measurements for ahandheld computer using a lithium-ion battery with the dischargecharacteristics shown in FIG. 3 reveal that a target of seven daysbetween the sleep mode L1 and when the battery module discharges to the2.5 volts cutoff voltage 350 can be provided, by setting the L1 voltageat 3.71 volts.

For handheld computers using a lithium-ion battery 130 having thedischarge characteristics shown in FIG. 3, the hardware lockout (L2)occurs at a voltage of approximately 3.5 volts. In response to thevoltage comparator 134 providing a voltage level approximately equal tothe L2 voltage 340, the processor 104 receives a lockout interruptsignal and responds by locking out all power, application and connecteddevice interrupt signals. The L2 voltage 340 is estimated to provide aperiod in which the data stored in the memory 110 can be retained beforethe battery module 130 discharges to the cutoff voltage 350 ofapproximately two days. When the battery module 130 discharges to the,the battery-powered computer 100 shuts off, and the user loses volatiledata stored in the memory 110. The battery module 130 should berecharged before the cutoff voltage 350 is reached.

The L2 to cutoff voltage difference is approximately 0.75 volts for someembodiments of the handheld computer, as illustrated by the firstdischarge cycle curve 300A. L1 and L2 can move relative to each otherdepending on temperature and component tolerances. In some embodiments,a thermal sensor is included to set L1 and L2 such that the user's datais protected for at least 7 days after the sleep mode voltage (L1) isreached. The thermal sensor measures the ambient temperature ofoperation of the handheld computer and communicates to a coupledresidual energy management module 114, which, in turn, resets the sleepmode voltage (L1).

The hardware lockout (L2) can be implemented using hardware resources asdiscussed in application Ser. No. 09/321,686, entitled “Method andApparatus for Using Residual Energy in a Battery-Powered Computer,” byOsborn, et al. which is incorporated herein by reference.

Using hardware to lockout the application, power and connected deviceinterrupt signals ensures that the lockout will occur, and the residualbattery capacity reserved, even if there is a software failure. Suchsoftware failures can occur for L1, M1 and M2 and other software drivenevents because of program crashes or other defects.

F. Conclusion

In some embodiments of the invention, a sleep mode is initiated when theenergy source of a handheld computer has discharged to a predeterminedlow level. In this shutdown state, interrupt signals to activatehigh-energy consuming peripherals are masked but the handheld computerremains responsive to signals to turn power on. A handheld computerunder a sleep mode responds to signals to turn on energy consumingperipherals by first determining whether the energy source has beensufficiently recharged to exit the shutdown state induced by the sleepmode. If the battery module has been sufficiently recharged the handheldcomputer returns to the normal operational mode, otherwise it remains inthe shutdown state and continues to mask interrupt signals that activatehigh-energy consuming applications and devices.

The foregoing descriptions of various embodiments of the invention havebeen presented for purposes of illustration and description. It is notintended to limit the invention to the precise forms disclosed. Manymodifications and equivalent arrangements will be apparent.

1. A method for managing power in a handheld computer handheldelectronic device with one or more processors, the handheld computerhandheld electronic device having a sleep mode setting and comprising abattery, at least one input device for turning the handheld computerhandheld electronic device on, and at least one device for detecting abattery power level, the method comprising: receiving an input signal toturn the handheld computer handheld electronic device on; determiningwhether the handheld computer handheld electronic device is in the sleepmode; accessing the device for detecting the battery power level if thehandheld computer handheld electronic device is in the sleep mode;responsive to detecting the battery power level, comparing the detectedbattery power level to a first predetermined power level that isselected from a group of power levels consisting of (i) a power levelthat occurs on or about one week prior to the handheld computer handheldelectronic device losing data stored in a memory of the handheldcomputer handheld electronic device, (ii) a power level that is based onmeasuring an ambient temperature of the handheld computer handheldelectronic device, and (iii) a power level that is based on about 3.71volts; and maintaining the handheld computer handheld electronic devicein the sleep mode if the detected battery power level is less than thefirst predetermined power level.
 2. The method of claim 1, whereinaccessing the device for detecting the battery power level is carriedout by an analog-to-digital converter device.
 3. The method of claim 1,wherein maintaining the sleep mode comprises: receiving an input signalfor turning on power in the handheld computer handheld electronicdevice; responding to the input signal by determining whether thehandheld computer handheld electronic device is in a sleep mode; andresponsive to determining that the handheld computer handheld electronicdevice is in a sleep mode, masking interrupt signals for powering one ormore applications and devices of the handheld computer handheldelectronic device.
 4. The method of claim 3, wherein: masking interruptsignals for powering the one or more applications and devices of thehandheld computer handheld electronic device includes masking interruptsignals for powering one or more applications and devices which providea feedback to the user that the handheld computer handheld electronicdevice is operational.
 5. The method of claim 4, wherein maskinginterrupt signals for powering the one or more applications and deviceswhich provide a feedback to the user that the handheld computer handheldelectronic device is operational includes masking interrupt signals forpowering a display device.
 6. The method of claim 4, wherein maskinginterrupt signals for powering the one or more applications and deviceswhich provide a feedback to the user that the handheld computer handheldelectronic device is operational includes masking interrupt signals forpowering a communications device.
 7. A method for managing power in ahandheld computer handheld electronic device with one or more processorshaving a sleep mode setting, the handheld computer handheld electronicdevice comprising a battery, at least one input device for turning thehandheld computer handheld electronic device on, and at least one devicefor detecting a battery power level, the method comprising: replenishingthe primary energy source; receiving an input signal to turn thehandheld computer handheld electronic device on; determining whether thehandheld computer handheld electronic device is in the sleep mode;accessing the device for detecting the battery power level if thehandheld computer handheld electronic device is in the sleep mode;responsive to detecting the battery power level, comparing the detectedbattery power level to a first predetermined power level; comparing thedetected battery power level to a second predetermined power level ifthe detected battery power level is greater than the first predeterminedpower level; and exiting the sleep mode when the detected battery powerlevel is greater than the second predetermined power level.
 8. Themethod of claim 7, wherein the battery of the handheld computer handheldelectronic device is a rechargeable battery, replenishing the primaryenergy source comprising: recharging the rechargeable battery.
 9. Themethod of claim 7, wherein the battery of the handheld computer handheldelectronic device is a non-rechargeable battery, replenishing theprimary energy source comprising: replacing the non-rechargeablebattery.
 10. The method of claim 7, wherein the exiting the sleep modeoccurs when the detected battery power level is greater than a secondpredetermined voltage of on or about 0.10 volts higher than the firstpredetermined voltage.
 11. The method of claim 7, wherein the exitingthe sleep mode occurs when the detected battery power level is greaterthan a second predetermined voltage of on or about 3.81 volts.
 12. Anapparatus for reserving power in a handheld computer handheld electronicdevice with one or more processors, the handheld computer handheldelectronic device having a sleep mode setting, a battery as a primaryenergy source, at least one input device for turning on power, and atleast one device for detecting a battery power level, the handheldcomputer handheld electronic device including a subsystem, wherein thesubsystem comprises a processor coupled to a interrupt controller and amemory controller, the interrupt controller coupled to a memory, thememory including a sleep mode software and a residual energy managermodule, and wherein the subsystem is coupled to the device for detectinga battery power level, the apparatus comprising: responsive to receivingan input signal to turn device power on, means for accessing the sleepmode setting; responsive to determining that the handheld computerhandheld electronic device is in the sleep mode, means for accessing thedevice for detecting the battery power level; and responsive to thedetected battery power level, means for maintaining the sleep mode orexiting the sleep mode; responsive to detecting a battery power level,means for comparing the detected battery power level to a firstpredetermined power level; and responsive to determining the detectedbattery power level is less than the first predetermined power level,means for maintaining the handheld computer handheld electronic devicein the sleep mode; wherein the first predetermined power level is set ata level which provides on or about seven days of a normal usage of thehandheld computer handheld electronic device prior to the handheldcomputer handheld electronic device losing data stored in a memory ofthe handheld computer handheld electronic device.
 13. The apparatus ofclaim 12, wherein: the device for detecting the battery power levelincludes an analog-to-digital converter.
 14. The apparatus of claim 12,further comprising: responsive to receiving an input signal for turningon power in the handheld computer handheld electronic device, means fordetermining whether the handheld computer handheld electronic device isin a sleep mode; and responsive to determining that the handheldcomputer handheld electronic device is in a sleep mode, means foroperating the interrupt controller to mask interrupt signals forpowering one or more applications and devices of the handheld computerhandheld electronic device.
 15. The apparatus of claim 14, wherein theone or more applications and devices of the handheld computer handheldelectronic device includes an application or device which provides afeedback to the user that the handheld computer handheld electronicdevice is operational.
 16. The apparatus of claim 15, wherein the one ormore applications and devices of the handheld computer handheldelectronic device includes a display device.
 17. The apparatus of claim15, wherein the one or more applications and devices of the handheldcomputer handheld electronic device includes a communications device.18. An apparatus for reserving power in a handheld computer handheldelectronic device with one or more processors, the handheld computerhandheld electronic device having a sleep mode setting, a battery as aprimary energy source, at least one input device for turning on power,and at least one device for detecting a battery power level, thehandheld computer handheld electronic device including a subsystem,wherein the subsystem comprises a processor coupled to a interruptcontroller and a memory controller, the interrupt controller coupled toa memory, the memory including a sleep mode software and a residualenergy manager module, and wherein the subsystem is coupled to thedevice for detecting a battery power level, the apparatus comprising:responsive to receiving an input signal to turn device power on, meansfor accessing the sleep mode setting; responsive to determining that thehandheld computer handheld electronic device is in the sleep mode, meansfor accessing the device for detecting the battery power level; andresponsive to the detected battery power level, means for maintainingthe sleep mode or exiting the sleep mode; responsive to detecting abattery power level, means for comparing the detected battery powerlevel to a first predetermined power level; and responsive todetermining the detected battery power level is less than the firstpredetermined power level, means for maintaining the handheld computerhandheld electronic device in the sleep mode; a thermal sensor; andmeans for setting the first predetermined power level based on thethermal sensor detecting an ambient temperature of the handheld computerhandheld electronic device.
 19. The apparatus of claim 18, wherein: thedevice for detecting the battery power level includes ananalog-to-digital converter.
 20. The apparatus of claim 18, furthercomprising: responsive to receiving an input signal for turning on powerin the handheld computer handheld electronic device, means fordetermining whether the handheld computer handheld electronic device isin a sleep mode; and responsive to determining that the handheldcomputer handheld electronic device is in a sleep mode, means foroperating the interrupt controller to mask interrupt signals forpowering one or more applications and devices of the handheld computerhandheld electronic device.
 21. The apparatus of claim 20, wherein theone or more applications and devices of the handheld computer handheldelectronic device includes an application or device which provides afeedback to the user that the handheld computer handheld electronicdevice is operational.
 22. The apparatus of claim 21, wherein the one ormore applications and devices of the handheld computer handheldelectronic device includes a display device.
 23. The apparatus of claim21, wherein the one or more applications and devices of the handheldcomputer handheld electronic device includes a communications device.24. An apparatus for reserving power in a handheld computer handheldelectronic device with one or more processors, the handheld computerhandheld electronic device having a sleep mode setting, a battery as aprimary energy source, at least one input device for turning on power,and at least one device for detecting a battery power level, thehandheld computer handheld electronic device including a subsystem,wherein the subsystem comprises a processor coupled to a interruptcontroller and a memory controller, the interrupt controller coupled toa memory, the memory including a sleep mode software and a residualenergy manager module, and wherein the subsystem is coupled to thedevice for detecting a battery power level, the apparatus comprising:responsive to receiving an input signal to turn device power on, meansfor accessing the sleep mode setting; responsive to determining that thehandheld computer handheld electronic device is in the sleep mode, meansfor accessing the device for detecting the battery power level; andresponsive to the detected battery power level, means for maintainingthe sleep mode or exiting the sleep mode; responsive to detecting abattery power level, means for comparing the detected battery powerlevel to a first predetermined power level; and responsive todetermining the detected battery power level is less than the firstpredetermined power level, means for maintaining the handheld computerhandheld electronic device in the sleep mode; wherein the firstpredetermined power level is on or about 3.71 volts.
 25. The apparatusof claim 24, wherein: the device for detecting the battery power levelincludes an analog-to-digital converter.
 26. The apparatus of claim 24,further comprising: responsive to receiving an input signal for turningon power in the handheld computer handheld electronic device, means fordetermining whether the handheld computer handheld electronic device isin a sleep mode; and responsive to determining that the handheldcomputer handheld electronic device is in sleep mode, means foroperating the interrupt controller to mask interrupt signals forpowering one or more applications and devices of the handheld computerhandheld electronic device.
 27. The apparatus of claim 26, wherein theone or more applications and devices of the handheld computer handheldelectronic device includes an application or device which provides afeedback to the user that the handheld computer handheld electronicdevice is operational.
 28. The apparatus of claim 27, wherein the one ormore applications and devices of the handheld computer handheldelectronic device includes a display device.
 29. The apparatus of claim27, wherein the one or more applications and devices of the handheldcomputer handheld electronic device includes a communications device.30. An article comprising a machine-readable storage medium containinginstructions that if executed enable a system to manage power in ahandheld electronic device with one or more processors, the handheldelectronic device having a sleep mode setting and comprising a battery,at least one input device for turning the handheld electronic device on,and at least one device for detecting a battery power level, theinstructions that if executed enable the system to: receive an inputsignal to turn the handheld electronic device on; determine whether thehandheld electronic device is in the sleep mode; access the device fordetecting the battery power level if the handheld electronic device isin the sleep mode; responsive to detecting the battery power level,compare the detected battery power level to a first predetermined powerlevel that is selected from a group of power levels consisting of (i) apower level that occurs on or about one week prior to the handheldelectronic device losing data stored in a memory of the handheldelectronic device, (ii) a power level that is based on measuring anambient temperature of the handheld electronic device, and (iii) a powerlevel that is based on about 3.71 volts; and maintain the handheldelectronic device in the sleep mode if the detected battery power levelis less than the first predetermined power level.
 31. The article ofclaim 30, further comprising instructions that if executed enable thesystem to access the device for detecting the battery power level usingan analog-to-digital converter device.
 32. The article of claim 30,further comprising instructions that if executed enable the system tomaintain the sleep mode by receiving an input signal for turning onpower in the handheld electronic device; responding to the input signalby determining whether the handheld electronic device is in a sleepmode; and responsive to determining that the handheld electronic deviceis in a sleep mode, masking interrupt signals for powering one or moreapplications and devices of the handheld electronic device.
 33. Thearticle of claim 32, further comprising instructions that if executedenable the system to mask interrupt signals for powering the one or moreapplications and devices of the handheld electronic device includingmasking interrupt signals for powering one or more applications anddevices which provide a feedback to the user that the handheldelectronic device is operational.
 34. The article of claim 33, furthercomprising instructions that if executed enable the system to maskinterrupt signals for powering the one or more applications and deviceswhich provide a feedback to the user that the handheld electronic deviceis operational including masking interrupt signals for powering adisplay device.
 35. The article of claim 33, further comprisinginstructions that if executed enable the system to mask interruptsignals for powering the one or more applications and devices whichprovide a feedback to the user that the handheld electronic device isoperational including mask interrupt signals for powering acommunications device.
 36. An article comprising a machine-readablestorage medium containing instructions that if executed enable a systemto manage power in a handheld electronic device with one or moreprocessors having a sleep mode setting, the handheld electronic devicecomprising a battery, at least one input device for turning the handheldelectronic device on, and at least one device for detecting a batterypower level, the instructions that if executed enable the system to:replenish the primary energy source; receive an input signal to turn thehandheld electronic device on; determine whether the handheld electronicdevice is in the sleep mode; access the device for detecting the batterypower level if the handheld electronic device is in the sleep mode;responsive to detecting the battery power level, compare the detectedbattery power level to a first predetermined power level; compare thedetected battery power level to a second predetermined power level ifthe detected battery power level is greater than the first predeterminedpower level; and exit the sleep mode when the detected battery powerlevel is greater than the second predetermined power level.
 37. Thearticle of claim 36, wherein the battery of the handheld electronicdevice is a rechargeable battery, replenishing the primary energy sourcecomprising: recharging the rechargeable battery.
 38. The article ofclaim 36, wherein the battery of the handheld electronic device is anon-rechargeable battery, replenishing the primary energy sourcecomprising: replacing the non-rechargeable battery.
 39. The article ofclaim 36, further comprising instructions that if executed enable thesystem to exit the sleep mode when the detected battery power level isgreater than a second predetermined voltage of on or about 0.10 voltshigher than the first predetermined voltage.
 40. The article of claim36, further comprising instructions that if executed enable the systemto the exit the sleep mode when the detected battery power level isgreater than a second predetermined voltage of on or about 3.81 volts.